package com.jushu.storbox.filter;

import java.io.File;
import java.io.FileFilter;

public class DirFilter implements FileFilter
{
    
    public DirFilter()
    {
    }
    
    /**
     * Returns only true if given File is a directory
     */
    @Override
    public boolean accept(File pathname)
    {
        if (!pathname.isDirectory())
        {
            return false;
        }
        
        if (pathname.getName().startsWith("."))
        {
            return false;
        }
        
        return true;
    }
    
}
